<template>
  <div class="default-table-detail-container">
    <BaseTableInfo v-model="baseTableInfoModel" />
  </div>
</template>

<script lang="ts" setup>

import UserInfoAccountApi from '/@/api//UserInfoAccountApi.ts';

const props = defineProps({
  modelValue: {}
})
const route = useRouter()

const baseTableInfoModel = ref({
  columnCount: 3,
  autoFit: false,
  columnWidth: '300px',
  labelWidth: '100px',
  title: '基本信息',
  modelData: {},
  items: [   //渲染样式区域  通过key ===model 中的值
    {
      label: "id",
      field: "id",
    },
    {
      label: "子账号昵称",
      field: "nickName",
    },
    {
      label: "手机",
      field: "phone",
    },
    {
      label: "照片",
      field: "headPortrait",
    },
    {
      label: "用户状态",
      field: "sysIsfreeze",
    },

    {
      label: "签名",
      field: "autograph",
    },
    {
      label: "现在居住地",
      field: "livingCity",
    },
    {
      label: "生日",
      field: "birthday",
    },
    {
      label: "性别",
      field: "sex",
    },
    {
      label: "职业",
      field: "profession",
    },
    {
      label: "毕业学校",
      field: "college",
    },
  ],
  buttons: [   //标题操作区域
    // {
    //   name: "更多",
    //  buttonClass: 'danger',
    // width: 100,
    // click: (any: object) => {   //暴露的方法钩子
    // $baseMessage("这里执行业务", 'success', 'vab-hey-message-success');
    //},
    //},


  ]
})

onMounted(async () => {
  //初始化数据model
  const { data } = await UserInfoAccountApi.getDetail({
    id: props.modelValue.query.userInfoAccountId   //从路由中获取参数
  })
  baseTableInfoModel.value.modelData = data;


})
</script>

<style lang="scss" scoped>
.default-table-detail-container {
  :deep() {
    .el-form--inline {
      .el-form-item {
        margin-right: 10px;
      }
    }

    .el-descriptions__label {
      min-width: 80px !important;
      text-align: right;
    }
  }
}
</style>
